﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Model;
using Newtonsoft.Json.Linq;
using BLL;
using DAL;
using IDAL;
/***************************
 * 数据访问层
 * 评估功能
 * Author：JXL
 ***************************/ 
namespace EstateService.Controllers
{
    public class AssessController : ApiController
    {
        Factory<IAssessDAL, AssessDAL> fa = new Factory<IAssessDAL, AssessDAL>();
        // GET api/prospect
        /// <summary>
        /// 展示
        /// </summary>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <param name="wherestr"></param>
        /// <returns></returns>
        [HttpGet]
        [ActionName("listget")]
        public pagelist<Basic_infoss> listGet(int pageindex, int pagesize, string wherestr,int id)
        {
            return fa.bll().getlist(pageindex, pagesize, wherestr,id);
        }

        // GET api/assess/5
       /// <summary>
       /// 获取数据
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>
        public Basic_infoss Get(int id)
        {
            return fa.bll().getmodel(id);
        }

        // POST api/assess
        public void Post([FromBody]string value)
        {
        }

        // PUT api/assess/5
        /// <summary>
        /// 更新数据
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public int Put([FromBody]Basic_Info value)
        {

            return fa.bll().UpdateBasic(value);
        }

        // DELETE api/assess/5
        public void Delete(int id)
        {
        }
    }
}
